#!/usr/bin/python3

def replaceLetters(letters):
  letterList = letters.split()
  letterList += letters.upper().split()
  sentenceList = []
  sentenceNum = input('How many sentences?\n')
  for i in range(int(sentenceNum)):
    print('Sentence', (i+1))
    line = input()
    sentenceList.append(line)
  for sentence in sentenceList:
    for char in letterList:
      sentence = sentence.replace(char, "_")
    print(sentence)
  print("\n")

letters = input("Please enter two letters separate by a space, # # to end.\n")
while letters != '# #':
  replaceLetters(letters)
  letters = input("Please enter two letters separate by a space, # # to end.\n")

  